            
                <!-- FOOTER -->
                <div class="footer-space"></div>
                <div id="footer">
                    <div class="devider-footer-left"></div>
                    <div class="time">
                        <p id="spanDate"></p>
                        <p id="clock"></p>
                    </div>
                    <div class="copyright">Copyright Alta Media &copy; 2014</div>
                    <div class="devider-footer"></div>


                </div>
                <!-- / END OF FOOTER -->


            </div>
        </div>
    </div>
    <!--  END OF PAPER WRAP -->
<!-- Modal -->
<div class="modal fade" id="myModal"  role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title" id="myModalLabel"></h4>
      </div>
      <div class="modal-body">
        
      </div>
    </div>
  </div>
</div>
    <!-- MAIN EFFECT -->

    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/jquery.migrate.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/bootstrap.js"></script>
    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/jquery.blockUI.js"></script>
    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/jquery.ba-hashchange.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/jquery.toastr.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/app.js"></script>
    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/load.js"></script>
    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/main.js"></script>
    <script type="text/javascript" src="<?php echo base_url('public/theme/'.T); ?>/js/custom.js"></script>
     <script src="<?php echo base_url('public/theme/'.T); ?>/js/chosen.jquery.js" type="text/javascript"></script>
      <script type="text/javascript">
        var config = {
          '.chosen-select'           : {},
          '.chosen-select-deselect'  : {allow_single_deselect:true},
          '.chosen-select-no-single' : {disable_search_threshold:10},
          '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
          '.chosen-select-width'     : {width:"95%"}
        }
        for (var selector in config) {
          $(selector).chosen(config[selector]);
        }
      </script>
    <script>
        $(document).ready(function(){
            $(".topnav > li > a").click(function() {
                $(".topnav > li > a").removeClass("active");
                $(this).addClass("active");
            });
        });
    </script>
<script src="<?php echo base_url(); ?>js/jquery.noty.packaged.min.js"></script>
<script src="<?php echo base_url(); ?>js/bootstrap-datepicker.js"></script>
<script src="<?php echo base_url(); ?>js/jquery.timepicker.min.js"></script>
<script src="<?php echo base_url(); ?>js/editable.js"></script>
<script src="<?php echo base_url(); ?>js/jquery.uploadify.min.js"></script>
<script src="<?php echo base_url(); ?>js/bootbox.js"></script>
<script src="<?php echo base_url(); ?>js/jquery.fancybox.js"></script>
 <script src="<?php echo base_url(); ?>js/charts/easypiechart/jquery.easy-pie-chart.js"></script> 
<script src="<?php echo base_url(); ?>js/app.plugin.js"></script>
<script src="<?php echo base_url(); ?>js/script.js"></script>
<script src="<?php echo base_url(); ?>js/script.feeds.js"></script>


<script src="<?php echo base_url('public/theme/'.T); ?>/js/jquery.mCustomScrollbar.concat.min.js"></script>
	
	<script>
		(function($){
			$(window).load(function(){
				
        $('.datepicker-input1').datepicker();
        $('.datepicker-input2').datepicker();

				$(".content").mCustomScrollbar({
					snapAmount:40,
					scrollButtons:{enable:true},
					keyboard:{scrollAmount:40},
					mouseWheel:{deltaFactor:40},
					scrollInertia:400
				});
				
			});
		})(jQuery);

    $(document).on('click', '[data-toggle="ajaxModal"]', function(e) {
            $('#ajaxModal').remove();
            e.preventDefault();
            var $this = $(this),
                $remote = $this.data('remote') || $this.attr('href'),
                $modal = $('<div class="modal fade" id="ajaxModal"><div class="modal-body"></div></div>');
            $('body').append($modal);
            $modal.modal();
            $modal.load($remote);
        });
	</script>
	<script>
<?php  if($this->session->userdata('expire_date')!=""){  ?>
   time_count = '<?php echo strtotime($this->session->userdata('expire_date'))-time()?>';
	var setinterval = setInterval(function() {
		
		//  console.log(time_count);
		  if(time_count<60){
		  clearInterval(setinterval);
			bootbox.confirm("Còn "+time_count+" giây nữa hệ thống sẽ logout. Bạn có muốn gia hẹn thêm thời gian sử dụng không", function(result) {
				if(result==true){
					$.ajax({
						type: "GET",
						dataType:"JSON",
						url:MAIN_URL +'apis/extend_token/?token=<?php echo $this->session->userdata('user_token')?>',
						data: {
							
						},
						success: function(json){	
							if(json.result==1){
								generate('top',json.msg,'success',3000);
							}else{
								generate('top',json.msg,'error',3000);
								setTimeout( function() { window.location = json.url }, 1500);		
							}
							

						},complete: function(){
							//selectListSale(0);
						}          
					});
				}
			});
		  }else{
			  time_count-=1;
		  }
	}, 1000);

	
  <?php
 
 }
 ?>

</script>
</body>
</html>